
from paddleocr import PaddleOCR
from PIL import Image
import numpy as np


if __name__ == '__main__':
    # imgPath = input('请输入图片路径:')
    # print('图片路径：' + imgPath)
    imgPath = "C:\\Users\\Administrator\\Pictures\\实际大题.jpg"
    image = Image.open(imgPath)
    ocr = PaddleOCR(use_angle_cls=True, use_gpu=False, ocr_version='PP-OCRv3')
    text = ocr.ocr(np.asarray(image), cls=True)
    for i in text:
        for j in i:
            print(j[1][0])
